package com.example.plant.broadcast

import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.util.Log
import com.example.plant.broadcast.GetPlantClassifyResultBroadCast.list.RECOGNIZED_INFO
import com.example.plant.broadcast.GetPlantClassifyResultBroadCast.list.TAG
import com.example.plant.entity.RecognizedInfo
import com.example.plant.util.http.Bean.ClassifyBean
import com.example.plant.util.http.Bean.ResultBean
import com.google.gson.Gson
import com.google.gson.GsonBuilder
import okhttp3.*;
import retrofit2.converter.gson.GsonConverterFactory

class GetPlantClassifyResultBroadCast(var recognizedInfo:RecognizedInfo=RecognizedInfo()): BroadcastReceiver() {
    object list
    {
    val TAG:String="GetPlantClassifyResult"

    val RECOGNIZED_INFO:String="recognized_info"
    }

    override fun onReceive(context: Context?, intent: Intent?) {
        Log.e(TAG, "onReceive: " + intent);
        val name=intent?.getStringExtra(RECOGNIZED_INFO)
        recognizedInfo.result.set(name)
    }


}